Skip to content

Conversation

iliasbo
Copy link
Member

@iliasbo iliasbo commented Sep 18, 2026

Description

This PR resolves issue #37 by ensuring the onlyFavorites filter is properly respected when building and navigating the Pokémon list.

Changes Included

  • pokemonController.ts: Updated candidateIds logic in GetNextFiltered and GetPrevFiltered to filter candidate IDs based on the onlyFavorites state.
  • PokemonList.tsx: Passed favoriteIds to matchesFilter so the favorites view correctly applies filter rules and renders matching Pokémon without unnecessary API calls.

Verification

  • Ran full test suite via npm test run (passing).
  • Tested manually via npm run dev: verified that toggling Only Favorites limits Prev/Next navigation exclusively to favorited Pokémon.

Closes #37

@iliasbo iliasbo requested a review from a team as a code owner September 18, 2026 15:45
Copy link
Member

@thomhet thomhet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iliasbo iliasbo merged commit 67ee32d into main Sep 18, 2026
@thomhet thomhet deleted the fix/37-only-favorites-filter branch September 18, 2026 22:58
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: onlyFavorites filter ignored in GetNextFiltered/GetPrevFiltered
2 participants